Skip to content

layersvt: Deduplicate DebugMarker object key fields - #52

Merged
olehkuznetsov merged 1 commit into
android-graphics:mainfrom
olehkuznetsov:pr-debugmarker-dedup-key
Nov 5, 2026
Merged

olehkuznetsov merged 1 commit into
android-graphics:mainfrom
olehkuznetsov:pr-debugmarker-dedup-key

Conversation

@olehkuznetsov

Copy link
Copy Markdown

Stacked on #50 (addresses review feedback from #46):

  • Replace DebugObjectName with DebugObjectKey (vk_device, object_type, handle) and DebugObjectKey::Hash, storing object names in std::unordered_map<DebugObjectKey, std::string, DebugObjectKey::Hash> instead of duplicating the three key fields in both the map key and value struct.
  • Use a colliding buffer handle (0x1111) across dev1 and dev2 in DebugMarkerTests.PreDestroyDeviceCleanupTest to verify per-device cleanup when handles collide across devices.

@olehkuznetsov
olehkuznetsov force-pushed the pr-debugmarker-dedup-key branch from a179c60 to ad5e123 Compare October 28, 2026 17:23
@olehkuznetsov
olehkuznetsov changed the base branch from pr-debugmarker-remove-on-destroy to main October 28, 2026 17:23
@olehkuznetsov
olehkuznetsov force-pushed the pr-debugmarker-dedup-key branch from ad5e123 to ad65302 Compare November 2, 2026 14:41
Comment thread layersvt/debug_marker/debug_marker.h Resolved
DebugObjectName stored vk_device, object_type, and handle alongside
the object name even though the map key already held the same three
fields. Move those fields into an ordered DebugObjectKey struct with a
defaulted operator<=> and store names in
std::map<DebugObjectKey, std::string>. Use a colliding handle across
devices in PreDestroyDeviceCleanupTest to cover per-device cleanup on
collision.

Bug:
Test: DebugMarkerTests#PreDestroyDeviceCleanupTest
Change-Id: Iec04eb396077047c0be7df0e908041846a6a6964
@olehkuznetsov
olehkuznetsov force-pushed the pr-debugmarker-dedup-key branch from ad65302 to 8c233aa Compare November 5, 2026 14:52
@olehkuznetsov
olehkuznetsov merged commit 42c0b35 into android-graphics:main Nov 5, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants